package com.dfdchem.imd.kaiwu.util;

import android.content.Context;
import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;

import androidx.annotation.NonNull;

public class CustomURLSpan extends ClickableSpan {

    private static final String TAG = "TextURLSpan";

    private String mUrl;
    private Context mContext;

    public CustomURLSpan(Context context, String url) {
        mContext = context;
        mUrl = url;
    }

    @Override
    public void onClick(@NonNull View widget) {
        Log.d(TAG, "onClick:" + mUrl);
    }
    @Override
    public void updateDrawState(TextPaint ds) {
        super.updateDrawState(ds);
    }
}
